Communication apparatus, communication method, and storage medium

ABSTRACT

A communication apparatus identifies an access point with which the communication apparatus can perform wireless communication and transmits information indicating the identified access point to a communication partner apparatus by way of the wireless communication. In response to this, an access point designated by the communication partner apparatus is registered as a relay access point.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a communication apparatus that performswireless communication, a communication method, and a storage medium.

2. Description of the Related Art

Up to now, when wireless communication is performed, wirelesscommunication with an intermediation of a relay access point(hereinafter, which will be referred to as AP) has been proposed. Asetting for performing wireless communication between a communicationapparatus that performs the wireless communication with theintermediation of the AP and the AP is to be conducted with respect tothe communication apparatus at this time. As a system for conductingthis setting, AirStation One-Touch Secure System (AOSS) and Wi-FiProtected Setup (WPS) have been proposed. According to these systems,the setting for the wireless communication is conducted by pressingrespective buttons of the communication apparatus and the AP at the sametime or inputting a PIN code issued by the AP to the communicationapparatus.

According to Japanese Patent Laid-Open No. 2005-032232, the followingconfiguration is disclosed. That is, mutual communication apparatuses(such as a laptop PC and a printer) that desire to perform the wirelesscommunication are connected by a wired interface. The laptop PC thenobtains a list of APs that the printer can access, and a user selects adesired AP from the listed APs. Subsequently, a cryptography key forperforming the communication with the AP selected by the user is inputfrom the laptop PC, so that the setting (registration) for performingthe wireless communication via the selected AP is conducted with respectto the printer.

However, in a case where the buttons are pressed at the same time, thecommunication apparatus and the AP are to be placed at locations wherethe pressing can be performed at the same time, and in a case where theregistration is conducted via the wired interface, a job in which afixed line cable is prepared and the communication apparatuses aremutually connected by using the fixed line cable is troublesome.

SUMMARY OF THE INVENTION

The present invention has been made to solve the above-mentionedproblems and provides a communication apparatus that can easily performa registration of a relay access point, a communication method, and astorage medium.

To solve the above-described problem, a communication apparatusaccording to an aspect of the present invention includes: acommunication unit configured to perform wireless communication with acommunication partner apparatus; an identification unit configured toidentify an access point that can be selected by the communication unit;a transmission unit configured to transmit information indicating theaccess point identified by the identification unit to the communicationpartner apparatus, via the communication unit; a reception unitconfigured to receive information designating an access point from thecommunication partner apparatus to which the information indicating theaccess point has been transmitted by the transmission unit, via thecommunication unit; and a registration unit configured to register theaccess point corresponding to the information received by the receptionunit as a relay access point used when the communication apparatusoperates in an infrastructure mode.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a configuration of an MFP.

FIG. 2 illustrates a configuration of a mobile terminal.

FIG. 3 is a flow chart illustrating a flow of processing by the MFP.

FIG. 4 is a flow chart illustrating a flow of processing by the mobileterminal.

DESCRIPTION OF THE EMBODIMENTS Exemplary Embodiment

Hereinafter, with reference to the drawings, an exemplary embodiment ofthe present invention will be described in detail for illustrativepurposes. Relative arrangements of constituent elements, displayscreens, and the like described according to the present exemplaryembodiment are not intended to limit the configurations to those only.

FIG. 1 is a block diagram illustrating a schematic configuration of amulti function printer (MFP) 100 having a wireless LAN (WLAN)communication function which corresponds to a communication apparatusaccording to an exemplary embodiment of the present invention. Herein,the apparatus having a reading function and a recording (printing)function has been taken as an example for the MFP 100, but the presentinvention can also be applied to apparatuses having various functionssuch as an apparatus that does not have one or both of these reading andrecording functions but has other functions and an apparatus that hasthese functions as well as other functions. A telephone and facsimilefunction (for a telephone circuit/for an IP network), a short distancewireless communication function (Bluetooth (registered trademark)communication, near field communication (NFC)) and the like can beadopted as the other functions.

The MFP 100 includes a CPU 102, a ROM 103, a RAM 104, a non-volatilememory 105, an image memory 106, an operation unit 107, a display unit108, a reading control unit 109, and a recording control unit 111 on amain board 101. The MFP 100 also includes a WLAN unit 114 connected viaa bus cable 113. These constituent elements are connected to each othervia a system bus 115 and are mutually communicable via the system bus115. In addition, the MFP 100 further includes a reading unit 110configured to realize a reading function of reading an image on anoriginal and a recording unit 112 configured to realize a recordingfunction of recording the image on a recording medium.

The CPU 102 controls an entirety of the MFP 100. Processing by the MFP100 which will be described below is executed by the control of the CPU102. The ROM 103 stores control programs executed by the CPU 102, anembedded operating system (OS) program, and the like. According to thepresent exemplary embodiment, the respective control programs stored inthe ROM 103 perform software controls such as scheduling and task switchunder a management of the embedded OS stored in the ROM 103. When acommunication with a communication partner apparatus is performed, theCPU 102 operates a protocol stack in accordance with the programs storedin the ROM 103. At this time, a setting of a plurality of sockets usedfor a communication operation or the like is also conducted. The RAM 104stores data such as a program control variable and also data such as asetting value registered by a user and management data for the MFP 100.In RAM 104, buffer areas for various works are provided. Thenon-volatile memory 105 is constituted by a memory such as a flashmemory and keeps storing the data even when a power supply is turnedOFF. The image memory 106 is constituted by a memory such as a dynamicRAM (DRAM) and accumulates image data input by the reading unit 110,image data received from an external part, and the like.

The operation unit 107 includes a hard switch and the like. Theoperation unit 107 accepts an operation from the user and informs theCPU 102 of the operation contents. The display unit 108 performs variousdisplays related to the MFP 100 (a display for guiding an operation tobe performed by the user and a display of information indicating a stateof the MFP 100 or the like). It is also possible to adopt a touch panelor the like where the operation unit 107 and the display unit 108 areintegrated with each other.

The reading control unit 109 controls the reading unit (scanner) 110(for example, a contact type image sensor (CIS image sensor)) tooptically read an image on an original and generates image data inaccordance with the read image.

The recording control unit 111 converts the input image data intorecording data to be recorded (printed) by the recording unit (printer)112 and controls the recording unit 112 to apply a recording material toa recording medium such as paper to record the image. An inkjet printerconfigured to eject ink as the recording material from a recording headand record the image on the recording medium can be adopted as therecording unit 112.

The WLAN unit 114 performs a communication with a terminal on a network(a network where a communication following TCP/IP can be performed) byway of wireless communication. The WLAN unit 114 can perform, forexample, a data (packet) communication in a WLAN system in conformity toIEEE802.11 series. In the wireless communication using the WLAN unit114, a software access point (software AP) mode, a WFD mode forperforming wireless communication based on Wi-Fi Direct (registeredtrademark) (WFD), and the like are prepared. In addition, the WLAN unit114 can perform the wireless communication in an ad hoc mode withoutusing the AP or an infrastructure mode via an external AP (relay AP).

The MFP 100 can operate by switching a WFD extend mode in which anextend service is performed on the basis of the WFD, the infrastructuremode in which the wireless communication is performed via a relay APother than its own AP, the ad hoc mode, and the like in addition to theabove described software AP mode and the WFD mode. These modes are notlimited to modes that are exclusively set, and a plurality of modes maybe set at the same time in some cases.

The software AP mode is a mode in which the MFP 100 operates as the APon the basis of the software setting. While the MFP 100 operates in thesoftware AP mode, since the MFP 100 periodically transmits a beaconsignal (packet) including its own SSID and the like, other communicationapparatus can detect the MFP 100 as the AP by performing an access pointsearch. The SSID in a case where the MFP 100 itself operates as the APis structured in a format following a previously determined rule, andcommunication partner apparatuses that understand this rule (format) caneasily identify the MFP 100. The rule includes, for example, acombination of information for identifying a model of the MFP 100 or aseries including this model, a MAC address of the MFP 100, amanufacturer name, and the like. This SSID is previously stored in theROM 103 or the like.

In the WFD mode, the MFP 100 directly performs the wirelesscommunication with another communication apparatus (communicationpartner apparatus) by way of peer-to-peer (P2P), and the MFP 100 itselfbecomes the AP or the communication partner apparatus becomes the AP onthe basis of Group Owner Negotiation. In the WFD extend mode, a servicethat can be executed when a negotiation of a mutually correspondingservice is further performed after the Group Owner Negotiation by theWFD is executed.

In the infrastructure mode, the MFP 100 performs the communication withthe communication partner apparatus via an external relay AP. In orderthat the MFP 100 operates in the infrastructure mode, the relay AP thatperforms the wireless communication with the MFP 100 and a parameter forperforming the wireless communication with this relay AP are to beregistered in the MFP 100.

In the ad hoc mode, the MFP 100 and the communication partner apparatusdirectly perform the wireless communication by way of P2P. The ad hocmode is different from the WFD mode and the WFD extend mode, and none ofthe apparatuses that perform the communication operate as the AP. Inorder that the MFP 100 operates in the ad hoc mode, a wirelesscommunication parameter common to the communication partner apparatus isto be registered in the MFP 100.

FIG. 2 is a block diagram illustrating a schematic configuration of amobile terminal 200 corresponding to the communication apparatusaccording to the exemplary embodiment of the present invention. Variousdevices such as a mobile phone, a smart phone, a laptop PC, a tabletterminal, a personal digital assistant (PDA), and a digital camera canbe adopted as the mobile terminal 200.

The mobile terminal 200 includes a CPU 202, a ROM 203, a RAM 204, anon-volatile memory 205, an image memory 206, a operation unit 207, anda display unit 208 on a main board 201. The mobile terminal 200 alsoincludes a WLAN unit 210 connected via a bus cable 209. Theseconstituent elements are connected to each other by a system bus 211 andare mutually communicable via the system bus 211. A description of theserespective constituent elements is similar to that of the constituentelements having the same designations illustrated in FIG. 1, andtherefore the description thereof herein will be omitted.

The non-volatile memory 205 can also store various application software,and various functions can be realized when the CPU 202 executes thevarious application software. The application software includes a webbrowser function, an electronic mail function, and the like. In FIG. 2,main constituent elements of the mobile terminal 200 are illustrated.Other than these, various functions such as a telephone function, acamera function, a Bluetooth (registered trademark) communicationfunction, an NFC function, a global positioning system (GPS) function, amicrophone function, a speaker function, and a television receivingfunction may be included.

Next, a description will be given of processing of registering the relayAP used when the MFP 100 operates in the infrastructure mode in the MFP100 by using the mobile terminal 200.

FIG. 3 is a flow chart illustrating a flow of the processing performedby the MFP 100 in this case, and FIG. 4 is a flow chart illustrating aflow of the processing performed by the mobile terminal 200. FIG. 3 isthe flow chart illustrating the flow of the processing performed whenthe CPU 102 of the MFP 100 loads the programs stored in the ROM 103 ontothe RAM 104 to be executed. FIG. 4 is the flow chart illustrating theflow of the processing performed when the CPU 202 of the mobile terminal200 loads the programs stored in the non-volatile memory 205 onto theRAM 204 to be executed.

In FIG. 3, when it is determined in S301 that a user performs anoperation for setting (registering) an AP for the infrastructure mode byusing the operation unit 107, the flow proceeds to S302, and the MFP 100is set in the infrastructure mode.

In S303, the MFP 100 searches for the AP with which the MFP 100 itselfcan perform the wireless communication via the WLAN unit 114. When theAP is detected as a result of this search, in S304, information withwhich the AP can be identified such as a model name and an SSID receivedfrom the AP (information included in the beacon transmitted by the AP)is sequentially stored (cached) in the RAM 104. The timing for thedetection of the AP is not limited to this timing, and a previouslyidentified AP may be stored in the RAM 104. If the MFP 100 performs thedetection of the accessible AP, the setting of the infrastructure modemay not be performed in S302. For example, the AP may be automaticallysearched for in a case where the AP registration mode for theinfrastructure mode enters.

Subsequently, in S305, the MFP 100 switches the mode to the software APmode. Accordingly, the MFP 100 periodically transmits the beaconincluding its own SSID and the like and is put in a state in which it ispossible to provide the information included in the beacon for the APsearch from the communication partner apparatus (the mobile terminal 200or the like). At this time, if a connection request is issued from thecommunication partner apparatus, an exchange of the communicationparameter or the like is performed, and an IP connection is executed.

In S306, it is determined whether or not an AP list request from thecommunication partner apparatus is accepted (received), and until it isdetermined in S307 that timeout occurs, the processing stands by for theAP list request. The timeout herein occurs if the IP connection is notestablished with the communication partner apparatus or the AP listrequest is not received even when a predetermined time elapses after theoperation for the AP setting start has been conducted in S301 or afterthe switching to the software AP mode has been performed in S305, andthe processing is ended. At this time, the processing may be ended in acase, for example, where a display indicating the end of the processingis performed on the display unit 108, and the user performs an operationto agree the end of the processing.

When it is determined in S306 that the AP list request is accepted fromthe communication partner apparatus, the flow proceeds to S308, and thelist of the information indicating the AP stored in the RAM 104 in S304is transmitted via the WLAN unit 114. At this time, in a case whereinformation of a plurality of APs exists, the information of theplurality of APs is transmitted. In a case where information of only asingle AP exists, the information of the single AP is transmitted, andin a case where no AP that can perform the communication exists,information indicating that no AP that can perform the communicationexists is transmitted. In a case where the AP that the MFP 100 canaccess does not exist, the processing is ended here.

In S309, it is determined whether or not AP information (SSID or thelike of the AP included in the AP list) for identifying the AP isreceived from the communication partner apparatus after the AP list istransmitted in S308. The processing stands by for this reception of theAP information until it is determined in S310 that timeout occurs.

When it is determined in S309 that the AP information is received, thesoftware AP mode is ended in S311, and the setting of the AP for theinfrastructure mode is conducted in S312. Specifically, a designated APis set as the relay AP at the time of the infrastructure mode in the RAM104, and in a case where a cryptography key is to be used for using theAP, a registration of the cryptography key or the like is performed. Atthis time, an attempt of a connection with the designated AP isperformed, for example, and the communication partner apparatus (herein,the mobile terminal 200) is notified of the result, for example, so thatthe communication partner apparatus may determine on whether or not theregistration can be performed. Subsequently, when the registration ofthe AP is appropriately ended, the flow proceeds to S313, and the MFP100 is set so that the MFP 100 is put in a state in which the wirelesscommunication via the AP registered in the infrastructure mode can beperformed (the normal infrastructure mode is set).

Accordingly, the MFP 100 is put in a state in which the wirelesscommunication can be performed via the set (registered) AP.

Next, a description will be given of the processing by the mobileterminal 200 functioning as the communication partner apparatus in theprocessing of FIG. 3.

In FIG. 4, in S401, a wireless LAN setting application (application forsetting the AP when the communication partner apparatus (the MFP 100 orthe like) operates in the infrastructure mode) is activated by anoperation by the user. This application is a program (software) storedin the non-volatile memory 205 and is previously installed by the user.Subsequently, in S402, a search for the AP that the mobile terminal 200can access is performed by this application via the WLAN unit 210. ThisAP search may be automatically executed by the activation of theapplication or may be executed in response to an AP search instructionby the user. The AP search is performed while the beacons transmitted bythe respective APs are received via the WLAN unit 210.

In S403, a list of APs (list of SSIDs) corresponding to the searchresult is displayed on the display unit 208. In S404, it is determinedwhether or not the user selects an AP from this list via the operationunit 107. When it is determined that the selection is made, the flowproceeds to S405, and it is determined whether or not the selected AP isa printer (apparatus) of a setting target in the present application.The determination in S405 is conducted on the basis of whether or notthe AP has the SSID in the format following the above-described rule.When it is determined that the AP selected here is not the apparatus ofthe setting target in the present application, a display indicating thateffect is performed by the display unit 208, and the flow stands by forthe selection of the AP from the AP list again. In a case where the APof the setting target in the present application does not exist in theAP list at this time or the AP desired by the user does not exist, theprocessing is ended here. In S404, the SSID in the format following theabove-described rule may be automatically selected. At this time, in acase where a plurality of relevant SSIDs exist, only those SSIDs may bedisplayed on the display unit 208, and the user may perform theselection from those SSIDs.

In S405, in a case where the AP of the setting target (herein, the MFP100) is selected, the mobile terminal 200 and the MFP 100 perform theexchange of the parameter for performing the wireless communication, forexample, and the MFP 100 is requested to transit a list of APs that theMFP 100 can access in S406. Subsequently, in S407, the flow stands byfor the reception of the AP list transmitted from the MFP 100 in S308.In a case where the AP list can be received before it is determined thatthe timeout occurs in S408, the flow proceeds to S409, and the receivedAP list is displayed on the display unit 208. In S408, when the timeoutoccurs in a case where the IP connection is not completed with the MFP100, a case where the MFP 100 does not transmit the AP list within anexpected time, or the like, the processing is ended.

In S410, the flow stands for the user to select the AP from the listdisplayed in S409 via the operation unit 207. When the AP is selected,the flow proceeds to S411, and it is determined whether or not theconnection to the selected AP can be performed. Herein, in a case wherea cryptography key for accessing the selected AP is to be used, thecryptography key input by the user via the operation unit 207 is used tocause the MFP 100 to attempt the connection. In a case where thecryptography key is not to be used, the MFP 100 is caused to attempt theconnection without using the cryptography key. Subsequently, in S412, ina case where the connection is appropriately established before it isdetermined that the timeout occurs, the flow proceeds to S413, and theMFP 100 is instructed to register this AP in the MFP 100 (to set this APon the RAM 104) as the AP for the infrastructure mode. In S412, in acase where the connection to the selected AP is not successfullyestablished within a predetermined time, the processing is ended here.

In a case where the AP is selected in S410 without performing theprocessing in S411 and S412, the flow may proceed to S413. In this case,after the execution of S413, the determination as to whether or not theconnection to the selected AP is executed on the MFP 100 side, themobile terminal 200 is caused to perform a notification of the result,and whether or not the registration of the AP is succeeded is displayedon the display unit 208.

The configuration is not limited to a case where the processing in S402to S404 is performed by the present application. The search may beperformed by another application or the like which is already installedin the mobile terminal 200, and the result may be obtained by thepresent application.

As the result of the above-described operations, in the mobile terminal200, the MFP 100 may be registered in the RAM 204 as the printer used inthe infrastructure mode.

As described above, according to the present exemplary embodiment, theregistration of the AP used when the MFP 100 operates in theinfrastructure mode can be easily performed by the wirelesscommunication between the mobile terminal 200 and the MFP 100.Therefore, the mobile terminal 200 and the MFP 100 may be located at adistance at which the respective apparatuses can mutually perform thewireless communication, and the user may avoid performing the operationson the respective apparatuses at the same time. In addition, therespective apparatuses may no longer be connected to each other by thefixed line cable. At this time, since the MFP 100 is once set in thesoft AP mode, the MFP 100 can be identified by a general AP search onthe mobile terminal 200 side. Subsequently, when the AP for theinfrastructure mode is registered in the MFP 100, the MFP 100 isautomatically set in the infrastructure mode, so that it is possible topromptly start the communication in the infrastructure mode. Inaddition, since the display of the AP list or the like is performed onthe mobile terminal 200 side, the MFP 100 can also be structured withoutthe display unit 108.

In the above-described example, by setting the MFP 100 in the soft APmode, the MFP 100 can be searched for by the AP search performed by themobile terminal 200, but the MFP 100 may be in another P2P mode, andother modes may also be adopted so long as the MFP 100 can be searchedfor by the wireless communication.

Moreover, in the above description, the MFP has been taken as an exampleas the communication apparatus operating in the infrastructure mode, butan apparatus in another mode may be employed so long as the apparatuscan operate in the infrastructure mode and also the apparatus itself canoperate as an access point. Furthermore, the mobile terminal has beentaken as an example as the communication apparatus used by the user forperforming the registration operation for the AP in the description, butan apparatus in another mode may also be employed so long as similarprocessing can be performed.

Processing similar to the above-described embodiment is also realized byexecuting the following processing. That is, in the processing, software(program) for realizing the functions of the above-described embodimentis supplied to a system or an apparatus via a network or various storagemedia, and a computer (or a CPU, an MPU, or the like) of the system orthe apparatus reads out and executes the program. The computer thatexecutes the program may be a single computer, or a plurality ofcomputers operate in cooperation with each other to execute the program.Furthermore, hardware such as a circuit that executes a part of theprogram may be provided, and the hardware and the computer that executesthe software may operate in cooperation with each other to execute theprocessing described according to the present exemplary embodiment.

According to the embodiment of the present invention, the registrationof the relay access point with respect to the communication apparatuscan be easily performed.

Other Embodiments

Embodiments of the present invention can also be realized by a computerof a system or apparatus that reads out and executes computer executableinstructions recorded on a storage medium (e.g., non-transitorycomputer-readable storage medium) to perform the functions of one ormore of the above-described embodiment(s) of the present invention, andby a method performed by the computer of the system or apparatus by, forexample, reading out and executing the computer executable instructionsfrom the storage medium to perform the functions of one or more of theabove-described embodiment(s). The computer may comprise one or more ofa central processing unit (CPU), micro processing unit (MPU), or othercircuitry, and may include a network of separate computers or separatecomputer processors. The computer executable instructions may beprovided to the computer, for example, from a network or the storagemedium. The storage medium may include, for example, one or more of ahard disk, a random-access memory (RAM), a read only memory (ROM), astorage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2013-150369, filed Jul. 19, 2013 which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. A communication apparatus comprising: acommunication unit configured to perform wireless communication with acommunication partner apparatus; an identification unit configured toidentify an access point that can be selected by the communication unit;a transmission unit configured to transmit information indicating theaccess point identified by the identification unit to the communicationpartner apparatus, via the communication unit; a reception unitconfigured to receive information designating an access point from thecommunication partner apparatus to which the information indicating theaccess point has been transmitted by the transmission unit, via thecommunication unit; and a registration unit configured to register theaccess point corresponding to the information received by the receptionunit as a relay access point used when the communication apparatusoperates in an infrastructure mode.
 2. The communication apparatusaccording to claim 1, further comprising: a setting unit configured toset a mode in which the communication apparatus operates as the accesspoint, wherein the transmission unit transmits the informationindicating the access point identified by the identification unit to thecommunication partner apparatus via the communication unit while thecommunication apparatus is set to operate as the access point by thesetting unit.
 3. The communication apparatus according to claim 2,wherein the setting unit sets the communication apparatus in theinfrastructure mode in a case where the registration unit registers theaccess point.
 4. The communication apparatus according to claim 2,wherein the setting unit sets the communication apparatus in a softwareaccess point mode as the mode in which the communication apparatusoperates as the access point.
 5. The communication apparatus accordingto claim 1, wherein the identification unit identifies the access pointdetected via the communication unit in a case where an operation forregistering the access point is performed when the communicationapparatus operates in the infrastructure mode.
 6. A communication methodfor communication between a first communication apparatus and a secondcommunication apparatus which can perform wireless communication, thecommunication method comprising: by the first communication apparatus,identifying an access point that can be selected by the firstcommunication apparatus to perform the wireless communication therewith;and transmitting information indicating the identified access point byway of the wireless communication; by the second communicationapparatus, receiving the information transmitted by the firstcommunication apparatus, by way of the wireless communication; selectingan access point on the basis of the received information indicating theaccess point; and transmitting information indicating the selectedaccess point to the first communication apparatus, by way of thewireless communication; by the first communication apparatus further,receiving the information transmitted by the second communicationapparatus; and registering the access point that is selected on thebasis of the received information as a relay access point to be usedwhen the first communication apparatus operates in an infrastructuremode.
 7. The communication method according to claim 6, furthercomprising: setting a mode in which the first communication apparatusfunctions as an access point, by the first communication apparatus; andidentifying the first communication apparatus by searching for theaccess point, by the second communication apparatus.
 8. Thecommunication method according to claim 7, further comprising: selectingan apparatus having an SSID in a predetermined format from a searchresult of the access point and identifying the first communicationapparatus, by the second communication apparatus.
 9. The communicationmethod according to claim 6, further comprising: determining whether ornot the identified first communication apparatus can be registered as anaccess point, by the second communication apparatus.
 10. Thecommunication method according to claim 6, further comprising: settingthe first communication apparatus in the infrastructure mode in a casewhere the access point is registered, by the first communicationapparatus.
 11. The communication method according to claim 6, furthercomprising: identifying the access point detected via the wirelesscommunication in a case where an operation for the registration isperformed, by the first communication apparatus.
 12. A storage mediumstoring a program that causes a communication apparatus to executeprocessing comprising: identifying an access point that performswireless communication with a communication partner apparatus;transmitting information that indicates the access point to thecommunication partner apparatus, by way of the wireless communication;receiving information that designates an access point from thecommunication partner apparatus to which the information indicating theaccess point has been transmitted, by way of the wireless communication;and registering the access point that corresponds to the receivedinformation as a relay access point to be used when the communicationapparatus operates in an infrastructure mode.
 13. The storage mediumaccording to claim 12, wherein the processing further comprises: settinga mode in which the communication apparatus operates as the accesspoint; and transmitting the information indicating the identified accesspoint to the communication partner apparatus by way of the wirelesscommunication while the communication apparatus is set to operate as theaccess point.
 14. The storage medium according to claim 13, wherein theprocessing further comprises: setting the communication apparatus in theinfrastructure mode in a case where the access point is registered. 15.The storage medium according to claim 13, wherein the processing furthercomprises: setting the communication apparatus in a software accesspoint mode in which the communication apparatus operates as the accesspoint.
 16. The storage medium according to claim 12, wherein theprocessing further comprises: identifying the access point detected viathe wireless communication in a case where an operation for registeringthe access point is performed when the communication apparatus operatesin the infrastructure mode.